package com.yihaodian.search.facet.merger;

import com.yihaodian.api.search.facet.SearchFacetSpec;
import com.yihaodian.search.facet.merger.impl.DefaultMerger;
import com.yihaodian.search.facet.merger.impl.HitDESCMerger;
import com.yihaodian.search.facet.merger.impl.LabelASCMerger;


public class MergeFactory {
	private static DefaultMerger defaultMerger = new DefaultMerger();
	private static HitDESCMerger hitMerger = new HitDESCMerger();
	private static LabelASCMerger labelMerger = new LabelASCMerger();
	public static FacetMerger getMerger(int sortType){
		switch (sortType) {
		case SearchFacetSpec.ORDER_HIT_DESC:
			return hitMerger;
		case SearchFacetSpec.ORDER_LABEL_ASC:
			return labelMerger;
		default:
			return defaultMerger;
		}
	}
}
